<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="js/vue.min.js" ></script>
	</head>
	<body>
		<div id="app">
			商品的价格是：{{price|rmb}}
			<p>{{num}}</p>
		<input type="button" v-on:click="num++" value="加值" />
		</div>
		
	</body>
	<script type="text/javascript">
		Vue.filter("rmb",function(val){
			if (val =='') {
				return
			}
			return '$'+val
		})	
		
		var vm = new Vue({
			el:'#app',
			data:{				
				price:33.9,
				num:'0'
			},		
			beforeCreate:function(){
				console.log("begoreCreate")
			},
			created:function(){
				console.log("created")
			},
			beforeMount:function(){
				console.log("beforeMount")
			},
			mounted:function(){
				console.log("mounted")
			},
			beforeUpdate:function(){
				console.log("beforeUpdate")
			},
			updated:function(){
				console.log("updated")
			}
			
		})
	</script>
</html>
